<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<% String path=request.getContextPath(); String basePath=request.getScheme()+ "://" + request.getServerName() + ":" + request.getServerPort() + path+ "/"; %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html xmlns="http://www.w3.org/1999/xhtml"> 
<head>
<base href="<%=basePath%>">
<title>险别添加</title>
<%@ include file="/WEB-INF/jsp/common/common.jsp" %>
<style type="text/css">
.input_text{
width: 250px;
}
.select_1{
width: 250px;
}
.content_table_1 th{background-color:#ECF5FC; color:#343233; width:11%; text-align:center; line-height:23px; font-family: "宋体"; font-size:12px; font-weight:normal; border-bottom:2px #bbcddb solid;}
</style>
<script src="js/jquery.validate.js" type="text/javascript" ></script>
<script src="js/jquery.divbox.js" type="text/javascript"></script>
<script src="js/json2.js" type="text/javascript"></script>


<script type="text/javascript">
var startP=1;
var prodType='${prodType}';
var prodCode='${prodCode}';
var useRiskCode="";
var Formstatus=true;

$(document).ready(function() {
	loadPlan({current:1,size:6,prodCode:prodCode});
});
function loadPlan(param){
	$.openLoading();
	$.ajax({
		url : "noCarProduct/loadPlan",
		type : 'POST',
		async : true,
		dataType:'json',
		data:param,
		success : function(page) {
			$.closeLoading();
			if($.validate(page))return;
			startP = page.current;
			var buttonStr = "<a href='javascript:void(0)' onClick='editRiskReq(this);return false'>编辑</a><br/><a href='javascript:void(0)' onClick='delRisk(this)'>删除</a>";
			/* 042Q 字段*/
			var tableContent = creatTable("riskCode@TDH,prodCode@TDH,nField1,riskName,nField7,nField8,nField16,nField17,nField4,nField6,nField11,nField20,nField5,nField9,nField12,nField18,nField19,nField3,nField10,nField15,cField1,cField2,cField3,cField4,cField5,riskCalType@TDH,riskCalDscp,cField9,cField10,",page,buttonStr);
			var tableObj = $("#ProdPlanTable");
			tableObj.find("tbody").remove();
			tableObj.append(tableContent);
			var strPage = creatChannelPage3(startP,6,page.maxPage,"13");
			var pageDIV = $("#ProdPlanpageDIV");
			pageDIV[0].innerHTML="";
			pageDIV.append(strPage);
		}
	});
}

function queryProdPlan(pagenum){
	loadPlan({current:pagenum,size:6,prodCode:prodCode});
}
function addRisk(param){
//	console.log(param);
	if(!Formstatus){
		$.message("error","正在处理中");
		return;
	}
	Formstatus=false;
	$.openLoading();
	$.ajax({
		url : "noCarProduct/saveRisk",
		type : 'POST',
		async : true,
		dataType:'json',
		data:param,
		success : function(obj) {
			Formstatus=true;
			$.closeLoading();
			if($.validate(obj))return;
			vreset();
			loadPlan({current:1,size:6,prodCode:prodCode});
		}
	});
}

//添加险别校验 得到校验规则后再进行修改
function add(){
	if($("#riskCode").val()==""){
		$.message("error","请选择险别");
    	return;
	}

	if($("#riskCalType").val()==""){
		$.message("error","请选择保费计算方式");
    	return;
	}
/*	
 
 if($.trim($("#nField18").val())==""){
		$.message("error","雇主家庭财产损失基础费率（‰）");
    	return;
	}
	if($.trim($("#nField6").val())==""){
		$.message("error","雇主或其家庭成员死亡、残疾每人责任限额（元）");
    	return;
	}
	if($.trim($("#cField9").val())==""){
		$.message("error","免赔条件");
    	return;
	}
*/

//获取节点对应的值 
/*
 RISK_CODE	投保险别
 N_FIELD_1	序号
 
 N_FIELD_7	雇主或其家庭成员意外伤害住院医疗费用累计责任限额
 N_FIELD_8	雇主或其家庭成员意外伤害住院医疗费用每次事故责任限额
 N_FIELD_16	雇主或其家庭成员意外伤害住院医疗费用基础费率（‰）
 N_FIELD_17	雇主或其家庭成员意外伤害住院医疗费用实际费率（‰）

 N_FIELD_4	雇主或其家庭成员死亡、残疾累计责任限额
 N_FIELD_6	雇主或其家庭成员死亡、残疾每人责任限额
 N_FIELD_11	雇主或其家庭成员死亡、残疾基础费率（‰）
 N_FIELD_20	雇主或其家庭成员死亡、残疾实际费率（‰）
 N_FIELD_5	雇主或其家庭成员死亡、残疾每次事故责任限额

 N_FIELD_9	雇主家庭财产损失累计责任限额
 N_FIELD_12	雇主家庭财产损失每次事故责任限额
 N_FIELD_18	雇主家庭财产损失基础费率（‰）
 N_FIELD_19	雇主家庭财产损失实际费率（‰）

 N_FIELD_3	第三者人身伤亡或财产损失累计责任限额
 N_FIELD_10	第三者人身伤亡或财产损失基础费率（‰）
 N_FIELD_15	第三者人身伤亡或财产损失实际费率（‰）

 C_FIELD_1	雇主或其家庭成员死亡、残疾实际保费（元）（C1）
 C_FIELD_2	雇主或其家庭成员意外伤害住院医疗费用实际保费（元）（C2）
 C_FIELD_3	雇主家庭财产损失实际保费（元）（C3）
 C_FIELD_4	第三者人身伤亡或财产损失实际保费（元）（C4）
 
 C_FIELD_5	含税保费(元)

 C_FIELD_9	免赔条件
 C_FIELD_10	特别约定
*/
	var riskCode = $('#riskCode').val();	//险别代码
	var riskName = $('#riskCode').find("option:selected").text();	//险别名称
	var riskCalType= $("#riskCalType").val();
	var prmryFlag= $("#prmryFlag").val();
	
	var nField3= $("#nField3").val();
	var nField4= $("#nField4").val();
	var nField5= $("#nField5").val();
	var nField6= $("#nField6").val();
	var nField7= $("#nField7").val();
	var nField8= $("#nField8").val();
	var nField9= $("#nField9").val();
	var nField10= $("#nField10").val();
	var nField11= $("#nField11").val();
	var nField12= $("#nField12").val();
	var nField15= $("#nField15").val();
	var nField16= $("#nField16").val();	
	var nField17= $("#nField17").val();	
	var nField18= $("#nField18").val();	
	var nField19= $("#nField19").val();	
	var nField20= $("#nField20").val();	
	var cField1= $("#cField1").val();	
	var cField2= $("#cField2").val();	
	var cField3= $("#cField3").val();	
	var cField4= $("#cField4").val();
	var cField5= $("#cField5").val();
	var cField9= $("#cField9").val();
	var cField10= $("#cField10").val();
	
	addRisk({prodType:prodType,prodCode:prodCode,riskCode:riskCode,riskName:riskName,riskCalType:riskCalType,prmryFlag:prmryFlag,
			nField3:nField3,nField4:nField4,nField5:nField5,nField6:nField6,nField7:nField7,nField8:nField8,nField9:nField9,nField10:nField10,
			nField11:nField11,nField12:nField12,nField15:nField15,nField16:nField16,nField17:nField17,nField18:nField18,nField19:nField19,nField20:nField20,
			cField1:cField1,cField2:cField2,cField3:cField3,cField4:cField4,cField5:cField5,cField9:cField9,cField10:cField10});
}

/**
 * 重置
 */
function vreset(){
	$("#riskCode").val("");
	$("#riskCalType").val("");
	$("#nField3").val("");
	$("#nField4").val("");
	$("#nField5").val("");
	$("#nField6").val("");
	$("#nField7").val("");
	$("#nField8").val("");
	$("#nField9").val("");
	$("#nField10").val("");
	$("#nField11").val("");
	$("#nField12").val("");
	$("#nField15").val("");
	$("#nField16").val("");
	$("#nField17").val("");
	$("#nField18").val("");
	$("#nField19").val("");
	$("#nField20").val("");
	$("#cField1").val("");
	$("#cField2").val("");
	$("#cField3").val("");
	$("#cField4").val("");
	$("#cField5").val("");
	$("#cField9").val("");
	$("#cField10").val("");
	$("#prmryFlag").val("");
	$("#prmryFlagText").val("");
}
/**
 * 删除险别
 */
function delRisk(obj){
	var riskCode  = $(obj).parent('td').parent('tr')[0].childNodes[0].innerHTML;
	var indexId  =  $(obj).parent('td').parent('tr')[0].childNodes[2].innerHTML;

	$.dialog({
		type: "warn",//success,error
		content: "您确定要删除该险别吗？",
		onOk: function() {
			deleteRisk(prodCode,riskCode,indexId);
		}
	});
}
function deleteRisk(prodCode,riskCode,indexId){
	
	$.openLoading();
	$.ajax({
		url : "noCarProduct/riskDelete",
		type : 'POST',
		async : true,
		dataType:'json',
		data:{prodCode:prodCode,riskCode:riskCode,nField1:indexId},
		success : function(obj) {
			$.closeLoading();
			if($.validate(obj))return;
			
			loadPlan({current:1,size:6,prodCode:prodCode});
		}
	});
}
var nField1=0;
//打开编辑窗口，编辑“组合方案信息”
function editRiskReq(obj){
	/*
		页面中已添加险别列表中获取节点元素顺序
		riskCode@TDH,prodCode@TDH,nField1,riskName,
		N_FIELD_7,N_FIELD_8,N_FIELD_16,N_FIELD_17,
		N_FIELD_4,N_FIELD_6,N_FIELD_11,N_FIELD_20,N_FIELD_5,
		N_FIELD_9,N_FIELD_12,N_FIELD_18,N_FIELD_19,
		N_FIELD_3,N_FIELD_10,N_FIELD_15,
		C_FIELD_1,C_FIELD_2,C_FIELD_3,C_FIELD_4,C_FIELD_5,
		riskCalType@TDH,riskCalDscp,
		C_FIELD_9,C_FIELD_10
	*/
	var editTr = $(obj).parent('td').parent('tr')[0];
	var riskCode = editTr.childNodes[0].innerHTML;
	useRiskCode=riskCode;
	nField1 = editTr.childNodes[2].innerHTML;
	var riskName = editTr.childNodes[3].innerHTML;
	var nField7 = editTr.childNodes[4].innerHTML;
	var nField8 = editTr.childNodes[5].innerHTML;
	var nField16 = editTr.childNodes[6].innerHTML;
	var nField17 = editTr.childNodes[7].innerHTML;
	var nField4 = editTr.childNodes[8].innerHTML;
	var nField6 = editTr.childNodes[9].innerHTML;
	var nField11 = editTr.childNodes[10].innerHTML;
	var nField20 = editTr.childNodes[11].innerHTML;
	var nField5 = editTr.childNodes[12].innerHTML;
	var nField9 = editTr.childNodes[13].innerHTML;
	var nField12 = editTr.childNodes[14].innerHTML;
	var nField18 = editTr.childNodes[15].innerHTML;
	var nField19 = editTr.childNodes[16].innerHTML;
	var nField3 = editTr.childNodes[17].innerHTML;
	var nField10 = editTr.childNodes[18].innerHTML;
	var nField15 = editTr.childNodes[19].innerHTML;
	var cField1 = editTr.childNodes[20].innerHTML;
	var cField2 = editTr.childNodes[21].innerHTML;
	var cField3 = editTr.childNodes[22].innerHTML;
	var cField4 = editTr.childNodes[23].innerHTML;
	var cField5 = editTr.childNodes[24].innerHTML;
	var riskCalType = editTr.childNodes[25].innerHTML;
	var cField9 = editTr.childNodes[27].innerHTML;
	var cField10 = editTr.childNodes[28].innerHTML;
	
	
	//$("#eriskCode").val(riskCode);
	
	$("#eriskName").val(riskName);
	$("#enField7").val(nField7);
	$("#enField8").val(nField8);
	$("#enField16").val(nField16);
	$("#enField17").val(nField17);
	
	$("#enField4").val(nField4);
	$("#enField6").val(nField6);
	$("#enField11").val(nField11);
	$("#enField20").val(nField20);
	$("#enField5").val(nField5);
	
	$("#enField9").val(nField9);
	$("#enField12").val(nField12);
	$("#enField18").val(nField18);
	$("#enField19").val(nField19);
	
	$("#enField3").val(nField3);
	$("#enField10").val(nField10);
	$("#enField15").val(nField15);
	
	$("#ecField1").val(cField1);
	$("#ecField2").val(cField2);
	$("#ecField3").val(cField3);
	$("#ecField4").val(cField4);
	$("#ecField5").val(cField5);
	
	$("#eriskCalType").val(riskCalType);
	
	$("#ecField9").val(cField9);
	$("#ecField10").val(cField10);
	
	$("#editPlanDiv").OpenDiv();
}

function saveEditRisk(){
	if($("#eriskCalType").val()==""){
		$.message("error","请选择保费计算方式");
    	return;
	}

/* 	var Amount= $.trim($("#eamount").val());
	if(Amount.length==0){
		$.message("error","累计赔偿限额(元)");
    	return;
	} */
/*    
 	校验	
	
    //小数点. 后面只能保留2位小数
    var reg = new RegExp("^(([1-9][0-9]*)|0)(\.[0-9]{1,2})?$");
    var flag= reg.test(Amount);
    if(!flag){
    	$.message("error","输入 累计责任限额(元)最多保留2位小数");
    	return;
    }
    //没有小数点情况下，输入金额长度不能超过8位数字
    var strval = Amount+"";
    var idx = strval.indexOf('.');
    if(idx==-1){
    	if(strval.length>8){
    		$.message("error","输入累计责任限额(元)长度不能超过8位数字");
    		return;
    	}
    }
    var nField17= $("#enField17").val();
    if($.trim(nField17)==''){
    	$.message("error","输入基准费率(‰)");
		return;
    }

 	var nField19= $("#enField15").val();
    if($.trim(nField19)==''){
    	$.message("error","输入调整系数调整系数");
		return;
    }
	var nField6= $("#enField6").val();
	 if($.trim(nField6)==''){
	    	$.message("error","输入每次事故赔偿限额(元)");
			return;
	}
*/
	var riskCode = $('#eriskCode').val();
	var riskCalType= $("#eriskCalType").val();
	var nField3 = $("#enField3").val();
	var nField4 = $("#enField4").val();
	var nField5 = $("#enField5").val();
	var nField6 = $("#enField6").val();
	var nField7 = $("#enField7").val();
	var nField8 = $("#enField8").val();
	var nField9 = $("#enField9").val();
	var nField10 = $("#enField10").val();
	var nField11 = $("#enField11").val();
	var nField12 = $("#enField12").val();
	var nField15 = $("#enField15").val();
	var nField16 = $("#enField16").val();
	var nField17 = $("#enField17").val();
	var nField18 = $("#enField18").val();
	var nField19 = $("#enField19").val();
	var nField20 = $("#enField20").val();
	var cField1 = $("#ecField1").val();
	var cField2 = $("#ecField2").val();
	var cField3 = $("#ecField3").val();
	var cField4 = $("#ecField4").val();
	var cField5 = $("#ecField5").val();
	var cField9 = $("#ecField9").val();
	var cField10 = $("#ecField10").val();
	
	updateRiskInfo({prodType:prodType,prodCode:prodCode,riskCode:useRiskCode,riskCalType:riskCalType,
		nField3:nField3,nField4:nField4,nField5:nField5,nField6:nField6,nField7:nField7,nField8:nField8,nField9:nField9,nField10:nField10,
		nField11:nField11,nField12:nField12,nField15:nField15,nField16:nField16,nField17:nField17,nField18:nField18,nField19:nField19,nField20:nField20,
		cField1:cField1,cField2:cField2,cField3:cField3,cField4:cField4,cField5:cField5,cField9:cField9,cField10:cField10,nField1:nField1});
}


function updateRiskInfo(param){
	if(!Formstatus){
		$.message("error", "正在处理中");
		return;
	}
	Formstatus=false;
	$.openLoading();
	$.ajax({
		url : "noCarProduct/riskUpdate",
		type : 'POST',
		async : true,
		dataType:'json',
		data:param,
		success : function(obj) {
			Formstatus=true;
			$.closeLoading();
			if($.validate(obj))return;
			loadPlan({current:1,size:6,prodCode:prodCode});
			closeEditPlanDiv();
		}
	});
}


function closeEditPlanDiv(){
	$("#editPlanDiv").CloseDiv();
}
//主附险标志
function addMainSign(){
	var otherCode = $('#riskCode :selected').attr('class');//主附险标志取值
	
	if(otherCode==0){
		$('#prmryFlagText').val('主险');
		$('#prmryFlag').val('0');
	}else if(otherCode==1){
		$('#prmryFlagText').val('附加险');
		$('#prmryFlag').val('1');
	}else{
		$('#prmryFlagText').val('');
		$('#prmryFlag').val('');
	}
}
</script>
<style>
	.input_text {
	padding-left: 3px;
	}
	</style>
</head>
<body>
<div class="right">
	      <div class="current">
	           <table class="current_table_1">
	              <tbody>
		              <tr>
		                <td><img src="./images/current_1.jpg"></td>
		                  <td class="current_table_1_td"><img src="images/current_1.png">&nbsp;您现在的位置：&nbsp;
			                  <span style=" color:#136bab; ">财险产品管理
			                  <span style="padding:0 5px; font-weight:bold; line-height:28px;">&gt;</span>产品配置
			                  <span style="padding:0 5px; font-weight:bold; line-height:28px;">&gt;</span>添加险别
			                  </span>
		                  </td>
		                  <td><img src="./images/current_3.jpg"></td>
		              </tr>
	           	  </tbody>
	           </table>
	      </div>
	      <div>
			<form id="inputForm" >
			<table class="table_05">
	              <tbody>
		    		  <tr>
 		              	<td style="line-height:23px;">
 		              		<font color="#3876bf"><b>产品代码：</b></font> ${prodCode}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#3876bf"><b>产品名称：</b></font>${prodName}
 		              	</td>
		              </tr>
	           	  </tbody>
	         </table> 
	        <table class="table_05">
	              <tbody>
		              <tr>
		                  <td colspan="4" style=" font-size:12px; font-weight:bold; text-align:left;color:#3876bf; line-height:17px; background-image:url(images/centent_1.jpg)">险别添加</td>
		              </tr>
		    		  <tr>
		                  <th width="35%">险别：</th>
		                  <td width="15%"><select id="riskCode" name = "riskCode" class="select_1" style="visibility: visible;"onchange="addMainSign()">
		                  					<option value="">------------------请选择------------------</option>
		                  					<c:forEach var ="riskCode" items="${riskCode}">
		                  						<option id="riskCode" class="${riskCode.otherCode}" value="${riskCode.code}">${riskCode.codeName}</option>
		                  					</c:forEach>
		                  				  </select><span class="red">*</span>
		                   </td>
		                   <th width="35%">保费计算方式：</th>
		                   <td width="15%"><select id="riskCalType" name = "riskCalType" class="select_1" style="visibility: visible;">
		                  					<option value="">------------------请选择------------------</option>
		                  					<c:forEach var ="riskTypeCal" items="${riskCalTypeList}">
		                  						<option value="${riskTypeCal.code}">${riskTypeCal.codeName}</option>
		                  					</c:forEach>
		                  				  </select>
		                  <span class="red">*</span></td>
		              </tr>
		              <tr>
		              	  <th width="35%">雇主或其家庭成员意外伤害住院医疗费用累计责任限额(元)：</th>
		                  <td width="15%"><input id="nField7" name = "nField7" type="text" maxlength="20" class="input_text" onKeyUp="clearNoNum(event,this)" onBlur="checkNum(this)"></td>
		                  <th width="35%">雇主或其家庭成员意外伤害住院医疗费用每次事故责任限额(元)：</th>
		                  <td width="15%"><input id="nField8" name = "nField8" type="text" maxlength="15" class="input_text" onKeyUp="clearNoNum(event,this)" onBlur="checkNum(this)"></td>
		              </tr>
		              <tr>
		              	  <th width="35%">雇主或其家庭成员意外伤害住院医疗费用基础费率(‰)：</th>
		                  <td width="15%"><input id="nField16" name = "nField16" type="text" maxlength="20" class="input_text" onKeyUp="clearNoNum(event,this)" onBlur="checkNum(this)"></td>
		                  <th width="35%">雇主或其家庭成员意外伤害住院医疗费用实际费率(‰)：</th>
		                  <td width="15%"><input id="nField17" name = "nField17" type="text" maxlength="15" class="input_text" onKeyUp="clearNoNum(event,this)" onBlur="checkNum(this)"></td>
		              </tr>
		              <tr>
		              	  <th width="35%">雇主或其家庭成员死亡、残疾累计责任限额(元)：</th>
		                  <td width="15%"><input id="nField4" name = "nField4" type="text" maxlength="20" class="input_text" onKeyUp="clearNoNum(event,this)" onBlur="checkNum(this)"></td>
		                  <th width="35%">雇主或其家庭成员死亡、残疾每人责任限额(元)：</th>
		                  <td width="15%"><input id="nField6" name = "nField6" type="text" maxlength="15" class="input_text" onKeyUp="clearNoNum(event,this)" onBlur="checkNum(this)"></td>
		              </tr>
		              <tr>
		              	  <th width="35%">雇主或其家庭成员死亡、残疾基础费率(‰)：</th>
		                  <td width="15%"><input id="nField11" name = "nField16" type="text" maxlength="20" class="input_text" onKeyUp="clearNoNum(event,this)" onBlur="checkNum(this)"></td>
		                  <th width="35%">雇主或其家庭成员死亡、残疾实际费率(‰)：</th>
		                  <td width="15%"><input id="nField20" name = "nField17" type="text" maxlength="15" class="input_text" onKeyUp="clearNoNum(event,this)" onBlur="checkNum(this)"></td>
		              </tr>
		              <tr>
		              	  <th width="35%">雇主或其家庭成员死亡、残疾每次事故责任限额(元)：</th>
		                  <td width="15%"><input id="nField5" name = "nField5" type="text" maxlength="20" class="input_text" onKeyUp="clearNoNum(event,this)" onBlur="checkNum(this)"></td>
		                  <th width="35%">雇主家庭财产损失累计责任限额(元)：</th>
		                  <td width="15%"><input id="nField9" name = "nField9" type="text" maxlength="15" class="input_text" onKeyUp="clearNoNum(event,this)" onBlur="checkNum(this)"></td>
		              </tr>
		              <tr>
		              	  <th width="35%">雇主家庭财产损失每次事故责任限额(元)：</th>
		                  <td width="15%"><input id="nField12" name = "nField12" type="text" maxlength="20" class="input_text" onKeyUp="clearNoNum(event,this)" onBlur="checkNum(this)"></td>
		                  <th width="35%">雇主家庭财产损失基础费率(‰)：</th>
		                  <td width="15%"><input id="nField18" name = "nField18" type="text" maxlength="15" class="input_text" onKeyUp="clearNoNum(event,this)" onBlur="checkNum(this)"></td>
		              </tr>
		              <tr>
		              	  <th width="35%">雇主家庭财产损失实际费率(‰)：</th>
		                  <td width="15%"><input id="nField19" name = "nField19" type="text" maxlength="20" class="input_text" onKeyUp="clearNoNum(event,this)" onBlur="checkNum(this)"></td>
		                  <th width="35%">第三者人身伤亡或财产损失累计责任限额(元)：</th>
		                  <td width="15%"><input id="nField3" name = "nField3" type="text" maxlength="15" class="input_text" onKeyUp="clearNoNum(event,this)" onBlur="checkNum(this)"></td>
		              </tr>
		              <tr>
		              	  <th width="35%">第三者人身伤亡或财产损失基础费率(‰)：</th>
		                  <td width="15%"><input id="nField10" name = "nField10" type="text" maxlength="20" class="input_text" onKeyUp="clearNoNum(event,this)" onBlur="checkNum(this)"></td>
		                  <th width="35%">第三者人身伤亡或财产损失实际费率(‰)：</th>
		                  <td width="15%"><input id="nField15" name = "nField15" type="text" maxlength="15" class="input_text" onKeyUp="clearNoNum(event,this)" onBlur="checkNum(this)"></td>
		              </tr>
		              <tr>
		              	  <th width="35%">雇主或其家庭成员死亡、残疾实际保费(元)：</th>
		                  <td width="15%"><input id="cField1" name = "cField1" type="text" maxlength="20" class="input_text" onKeyUp="clearNoNum(event,this)" onBlur="checkNum(this)"></td>
		                  <th width="35%">雇主或其家庭成员意外伤害住院医疗费用实际保费(元)：</th>
		                  <td width="15%"><input id="cField2" name = "cField2" type="text" maxlength="15" class="input_text" onKeyUp="clearNoNum(event,this)" onBlur="checkNum(this)"></td>
		              </tr>
		              <tr>
		              	  <th width="35%">雇主家庭财产损失实际保费(元)：</th>
		                  <td width="15%"><input id="cField3" name = "cField3" type="text" maxlength="20" class="input_text" onKeyUp="clearNoNum(event,this)" onBlur="checkNum(this)"></td>
		                  <th width="35%">第三者人身伤亡或财产损失实际保费(元)：</th>
		                  <td width="15%"><input id="cField4" name = "cField4" type="text" maxlength="15" class="input_text" onKeyUp="clearNoNum(event,this)" onBlur="checkNum(this)"></td>
		              </tr>
		              <tr>
		               	  <th width="35%">含税保费(元)：</th>
		                  <td width="15%"><input id="cField5" name = "cField5" type="text" maxlength="20" class="input_text" onKeyUp="clearNoNum(event,this)" onBlur="checkNum(this)"></td>
		              	  <th width="35%">主附险标志：</th>
		                  <td width="15%"  ><input id="prmryFlagText" name = "prmryFlagText"  type="text" maxlength="20" class="input_text" readonly="true" style=" background-color: #ccc;" onBlur="checkNum(this)"><span class="red">*</span></td>
		              </tr>
		              <tr>
		                  <th width="40%">免赔条件：</th>
		                  <td colspan="3"><textarea name="cField9" id="cField9"  maxlength="500"  rows="5" class="textarea_1" style="resize:none"></textarea></td>
		              </tr>
 		              <tr>
		                  <th width="40%">特别约定：</th>
		                  <td colspan="3"><textarea name="cField10" id="cField10"  maxlength="500"  rows="5" class="textarea_1" style="resize:none"></textarea></td>
		              </tr>
	           	  </tbody>
	         </table> 
	         <input id="prmryFlag" name = "prmryFlag"  type="text" maxlength="20" class="input_text" style="display: none"  >
	         <div align="center">
	             <input class="input_button_1" name="" type="button" onclick="add()" value="保存">&nbsp;&nbsp;
		         <input class="input_button_1" name="" type="button" onclick="vreset()"value="重置">
	         </div>
	         </form>
	      </div>
	      
 	      <!-- 险别列表 -->
			<div style="width: 100%;margin:5px;overflow:scroll;">
	  			<table class="table_02" style="width: 3400px;margin:5px">
	  				<tr>
						<td colspan="6" style=" font-size:12px; font-weight:bold; text-align:left;color:#3876bf; line-height:27px;height:27px; background-image:url(images/centent_1.jpg)">&nbsp;已添加险别列表</td>
					</tr>
	  				<tr>
	  					<td align="top">
		  					<div id="userDIV" style="overflow: scroll;">
				  				<table  id="ProdPlanTable"  class="content_table_1">
				  					<thead>
			              				<tr>
					                		<th style="width: 1%;">序号</th>
											<th style="width: 2%;">险别</th>
											<th style="width: 4%;">雇主或其家庭成员意外伤害住院医疗费用累计责任限额(元)</th>
											<th style="width: 4.5%;">雇主或其家庭成员意外伤害住院医疗费用每次事故责任限额(元)</th>
											<th style="width: 4%;">雇主或其家庭成员意外伤害住院医疗费用基础费率(‰)</th>
											<th style="width: 4%;">雇主或其家庭成员意外伤害住院医疗费用实际费率(‰)</th>
											<th style="width: 3%;">雇主或其家庭成员死亡、残疾累计责任限额</th>
											<th style="width: 3%;">雇主或其家庭成员死亡、残疾每人责任限额</th>
											<th style="width: 3%;">雇主或其家庭成员死亡、残疾基础费率(‰)</th>
											<th style="width: 3%;">雇主或其家庭成员死亡、残疾实际费率(‰)</th>
											<th style="width: 4%;">雇主或其家庭成员死亡、残疾每次事故责任限额(元)</th>
											<th style="width: 2.5%;">雇主家庭财产损失累计责任限额(元)</th>
											<th style="width: 3%;">雇主家庭财产损失每次事故责任限额(元)</th>
											<th style="width: 2.5%;">雇主家庭财产损失基础费率(‰)</th>
											<th style="width: 2.5%;">雇主家庭财产损失实际费率(‰)</th>
											<th style="width: 3%;">第三者人身伤亡或财产损失累计责任限额(元)</th>
											<th style="width: 3%;">第三者人身伤亡或财产损失基础费率(‰)</th>
											<th style="width: 3%;">第三者人身伤亡或财产损失实际费率(‰)</th>
											<th style="width: 3%;">雇主或其家庭成员死亡、残疾实际保费(元)</th>
											<th style="width: 4%;">雇主或其家庭成员意外伤害住院医疗费用实际保费(元)</th>
											<th style="width: 2.5%;">雇主家庭财产损失实际保费(元)</th>
											<th style="width: 3%;">第三者人身伤亡或财产损失实际保费(元)</th>
											<th style="width: 2%;">含税保费(元)</th>
											<th style="width: 2%;">保费计算方式</th>
											<th style="width: 4%;">免赔条件</th>
											<th style="width: 4%;">特别约定</th>
											<th style="width: 1.5%">操作</th>
			              				</tr>
			              			</thead>
						            <tbody>
									</tbody>
			            		</table>
								<div id="ProdPlanpageDIV"  class="page" >
		  				 		</div>
		  					</div>
	  					</td>
	  				</tr>
	  			</table>
  			</div>
 	      
</div>
	<!--   	添加模板 DIV 默认隐藏-->
	
	<div id="editPlanDiv" style="display: none;height: 80%;width: 68%;" align="center">
	
			<input type="hidden" id="row_num" name="row_num" value="0"/>
			<div class="table_title_div">
					<table class="table_title" style='width:100%;height: 20px;'>
						<tr>
						<td width="10%"></td>
						<td width="80%" id="interfaceName"></td>
						<td width="10%" align="right"><img src="/manager/images/closedown.gif" alt="关闭"  onclick="closeEditPlanDiv()"/></td>
						</tr>
					</table>
			</div>
			
			<div style="height: 95%;overflow-y: scroll">
			<table class="table_02" id="addtempletTable" align="center">
				<tbody>
					<tr>
						<td>
							<table id="coverageTable"  class="content_table_1" style="height:120px;">
								<tbody>
									<tr>
					                  <td width="50%" style="text-align:right;border-right:0px;">险别：&nbsp;&nbsp;</td>
					                  <td width="50%" style="text-align:left"><input type="text" id="eriskName" class="input_text"  readonly="readonly" style=" background-color: #ccc;"></td>
					                </tr>
					                <tr>  
					                  <td width="50%" style="text-align:right;border-right:0px;">雇主或其家庭成员意外伤害住院医疗费用累计责任限额(元)：&nbsp;&nbsp;</td>
					                  <td width="50%" style="text-align:left"><input id="enField7" type="text" maxlength="20" class="input_text" onKeyUp="clearNoNum(event,this)" onBlur="checkNum(this)"></td>
					                </tr>
					                <tr>  
					                  <td width="50%" style="text-align:right;border-right:0px;">雇主或其家庭成员意外伤害住院医疗费用每次事故责任限额(元)：&nbsp;&nbsp;</td>
					                  <td width="50%" style="text-align:left"><input id="enField8" type="text" maxlength="20" class="input_text" onKeyUp="clearNoNum(event,this)" onBlur="checkNum(this)"></td>
					                </tr>
					                <tr>  
					                  <td width="50%" style="text-align:right;border-right:0px;">雇主或其家庭成员意外伤害住院医疗费用基础费率(‰)：&nbsp;&nbsp;</td>
					                  <td width="50%" style="text-align:left"><input id="enField16" type="text" maxlength="20" class="input_text" onKeyUp="clearNoNum(event,this)" onBlur="checkNum(this)"></td>
					                </tr>
					                <tr>  
					                  <td width="50%" style="text-align:right;border-right:0px;">雇主或其家庭成员意外伤害住院医疗费用实际费率(‰)：&nbsp;&nbsp;</td>
					                  <td width="50%" style="text-align:left"><input id="enField17" type="text" maxlength="20" class="input_text" onKeyUp="clearNoNum(event,this)" onBlur="checkNum(this)"></td>
					                </tr>
					                <tr>  
					                  <td width="50%" style="text-align:right;border-right:0px;">雇主或其家庭成员死亡、残疾累计责任限额(元)：&nbsp;&nbsp;</td>
					                  <td width="50%" style="text-align:left"><input id="enField4" type="text" maxlength="20" class="input_text" onKeyUp="clearNoNum(event,this)" onBlur="checkNum(this)"></td>
					                </tr>
					                <tr>  
					                  <td width="50%" style="text-align:right;border-right:0px;">雇主或其家庭成员死亡、残疾每人责任限额(元)：&nbsp;&nbsp;</td>
					                  <td width="50%" style="text-align:left"><input id="enField6" type="text" maxlength="20" class="input_text" onKeyUp="clearNoNum(event,this)" onBlur="checkNum(this)"></td>
					                </tr>
					                <tr>  
					                  <td width="50%" style="text-align:right;border-right:0px;">雇主或其家庭成员死亡、残疾基础费率(‰)：&nbsp;&nbsp;</td>
					                  <td width="50%" style="text-align:left"><input id="enField11" type="text" maxlength="20" class="input_text" onKeyUp="clearNoNum(event,this)" onBlur="checkNum(this)"></td>
					                </tr>
					                <tr>  
					                  <td width="50%" style="text-align:right;border-right:0px;">雇主或其家庭成员死亡、残疾实际费率(‰)：&nbsp;&nbsp;</td>
					                  <td width="50%" style="text-align:left"><input id="enField20" type="text" maxlength="20" class="input_text" onKeyUp="clearNoNum(event,this)" onBlur="checkNum(this)"></td>
					                </tr>
					                <tr>  
					                  <td width="50%" style="text-align:right;border-right:0px;">雇主或其家庭成员死亡、残疾每次事故责任限额(元)：&nbsp;&nbsp;</td>
					                  <td width="50%" style="text-align:left"><input id="enField5" type="text" maxlength="20" class="input_text" onKeyUp="clearNoNum(event,this)" onBlur="checkNum(this)"></td>
					                </tr>
					                <tr>  
					                  <td width="50%" style="text-align:right;border-right:0px;">雇主家庭财产损失累计责任限额(元)：&nbsp;&nbsp;</td>
					                  <td width="50%" style="text-align:left"><input id="enField9" type="text" maxlength="20" class="input_text" onKeyUp="clearNoNum(event,this)" onBlur="checkNum(this)"></td>
					                </tr>
					                <tr>  
					                  <td width="50%" style="text-align:right;border-right:0px;">雇主家庭财产损失每次事故责任限额(元)：&nbsp;&nbsp;</td>
					                  <td width="50%" style="text-align:left"><input id="enField12" type="text" maxlength="20" class="input_text" onKeyUp="clearNoNum(event,this)" onBlur="checkNum(this)"></td>
					                </tr>
					                <tr>  
					                  <td width="50%" style="text-align:right;border-right:0px;">雇主家庭财产损失基础费率(‰)：&nbsp;&nbsp;</td>
					                  <td width="50%" style="text-align:left"><input id="enField18" type="text" maxlength="20" class="input_text" onKeyUp="clearNoNum(event,this)" onBlur="checkNum(this)"></td>
					                </tr>
					                <tr>  
					                  <td width="50%" style="text-align:right;border-right:0px;">雇主家庭财产损失实际费率(‰)：&nbsp;&nbsp;</td>
					                  <td width="50%" style="text-align:left"><input id="enField19" type="text" maxlength="20" class="input_text" onKeyUp="clearNoNum(event,this)" onBlur="checkNum(this)"></td>
					                </tr>
					                <tr>  
					                  <td width="50%" style="text-align:right;border-right:0px;">第三者人身伤亡或财产损失累计责任限额(元)：&nbsp;&nbsp;</td>
					                  <td width="50%" style="text-align:left"><input id="enField3" type="text" maxlength="20" class="input_text" onKeyUp="clearNoNum(event,this)" onBlur="checkNum(this)"></td>
					                </tr>
					                <tr>  
					                  <td width="50%" style="text-align:right;border-right:0px;">第三者人身伤亡或财产损失基础费率(‰)：&nbsp;&nbsp;</td>
					                  <td width="50%" style="text-align:left"><input id="enField10" type="text" maxlength="20" class="input_text" onKeyUp="clearNoNum(event,this)" onBlur="checkNum(this)"></td>
					                </tr>
					                <tr>  
					                  <td width="50%" style="text-align:right;border-right:0px;">第三者人身伤亡或财产损失实际费率(‰)：&nbsp;&nbsp;</td>
					                  <td width="50%" style="text-align:left"><input id="enField15" type="text" maxlength="20" class="input_text" onKeyUp="clearNoNum(event,this)" onBlur="checkNum(this)"></td>
					                </tr>
					                <tr>  
					                  <td width="50%" style="text-align:right;border-right:0px;">雇主或其家庭成员死亡、残疾实际保费(元)：&nbsp;&nbsp;</td>
					                  <td width="50%" style="text-align:left"><input id="ecField1" type="text" maxlength="20" class="input_text" onKeyUp="clearNoNum(event,this)" onBlur="checkNum(this)"></td>
					                </tr>
					                <tr>  
					                  <td width="50%" style="text-align:right;border-right:0px;">雇主或其家庭成员意外伤害住院医疗费用实际保费(元)：&nbsp;&nbsp;</td>
					                  <td width="50%" style="text-align:left"><input id="ecField2" type="text" maxlength="20" class="input_text" onKeyUp="clearNoNum(event,this)" onBlur="checkNum(this)"></td>
					                </tr>
					                <tr>  
					                  <td width="50%" style="text-align:right;border-right:0px;">雇主家庭财产损失实际保费(元)：&nbsp;&nbsp;</td>
					                  <td width="50%" style="text-align:left"><input id="ecField3" type="text" maxlength="20" class="input_text" onKeyUp="clearNoNum(event,this)" onBlur="checkNum(this)"></td>
					                </tr>
					                <tr>  
					                  <td width="50%" style="text-align:right;border-right:0px;">第三者人身伤亡或财产损失实际保费(元)：&nbsp;&nbsp;</td>
					                  <td width="50%" style="text-align:left"><input id="ecField4" type="text" maxlength="20" class="input_text" onKeyUp="clearNoNum(event,this)" onBlur="checkNum(this)"></td>
					                </tr>
					                <tr>  
					                  <td width="50%" style="text-align:right;border-right:0px;">含税保费(元)：&nbsp;&nbsp;</td>
					                  <td width="50%" style="text-align:left"><input id="ecField5" type="text" maxlength="20" class="input_text" onKeyUp="clearNoNum(event,this)" onBlur="checkNum(this)"></td>
					                </tr>
					                <tr>
					                  <td width="50%" style="text-align:right;border-right:0px;">保费计算方式：&nbsp;&nbsp;</td>
					                  <td width="50%" style="text-align:left"><select id="eriskCalType" class="select_1" style="visibility: visible;width:250px;">
		                  					<option value="">------------------请选择------------------</option>
		                  					<c:forEach var ="eriskTypeCal" items="${riskCalTypeList}">
		                  						<option value="${eriskTypeCal.code}">${eriskTypeCal.codeName}</option>
		                  					</c:forEach>
		                  				  </select><span class="red">*</span></td>
					                </tr>
 					                <tr>  
					                  <td width="50%" style="text-align:right;border-right:0px;">免赔条件：&nbsp;&nbsp;</td>
					                  <td width="50%" style="text-align:left"><textarea id="ecField9"  maxlength="500"  rows="5" class="textarea_1" style="resize:none;width: 250px"></textarea></td>
					                </tr>
					                <tr>  
					                  <td width="50%" style="text-align:right;border-right:0px;">特别约定：&nbsp;&nbsp;</td>
					                  <td width="50%" style="text-align:left"><textarea id="ecField10"  maxlength="500"  rows="5" class="textarea_1" style="resize:none;width: 250px"></textarea></td>
					                </tr>
								</tbody>
							</table>
						</td>
					</tr>
				</tbody>
			</table>
			<div align="center">
			   <input class="input_button_3" name="" type="button" onclick="saveEditRisk()" value="保存">&nbsp;&nbsp;
	           <input class="input_button_3" name="" type="button" onclick="closeEditPlanDiv()" value="取消">
			</div>
			</div>
 	</div>

</body>
</html>